<?php

global 	$tab_feature_b1,
        $tab_feature_b2,
        $screen_width,
        $tab_count_b1,
        $tab_count_b2,
        $tab_b1_titles,
        $tab_b2_titles;



function  gn_print_option_page()
{
	global 	$tab_feature_b1,
	        $tab_feature_b2,
	        $screen_width,
	        $tab_count_b1,
	        $tab_count_b2,
	        $tab_b1_titles,
  	      $tab_b2_titles;


	$output_line = '';

	$output_line =

	'	<div class="wrap">
			<h2>German Newspaper Theme Options</h2>

			<form action="" method="post">
				<p class="submit">
					<input type="submit" name="info_update" value="Update Options &raquo;" />
					<br />
				</p>
				<br />

				<fieldset>
					<h3>News-Headline - Image Location and Name</h3>
					<div id="theme_option_set">
						<p>
							Here you can type in the URL and name of the Images in des News-Headline.
						</p>
						<table>
							<tr>
								<td>
									Left-Image location:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_left_img" value="' . get_option( "gn_left_img" ) . '" />
								</td>
							</tr>
							<tr>
					  		<td>
							    Right-Image location:
							  </td>
							  <td>
									<input type="text" size="75" name="new_gn_right_img" value="' . get_option( 'gn_right_img' ) . '" />
							  </td>
							</tr>
						</table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - Color Settings</h3>
					<div id="theme_option_set">
			  		<p>
				  		Here you can set the values of different Theme colors.
			  		</p>
					  <table>
							<tr>
							  <td>
         		    	Outer Border Color:
					  		</td>
							  <td>
					        <input type="text" size="25" name="new_gn_body_background" value="' . get_option("gn_body_background" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
							  	Main Background Color:
							  </td>
							  <td>
					        <input type="text" size="25" name="new_gn_wrapper_background" value="' . get_option("gn_wrapper_background" ) . '" />
							  </td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />';
				
	_e( $output_line, 'german_newspaper');


	if ( $screen_width == 'on' )
	{
		$width_checkbox = ' checked="checked" ';
	}
	else
	{
		$width_checkbox = ' ';
	}


	$output_line =
'
				<fieldset>
			  	<h3>Theme - Width</h3>
					<div id="theme_option_set">
			  		<p>
            Here you can decide in which size you want the theme - 800px or 1024px (default).
			  		</p>
					  <table>
							<tr>
							  <td>
            Width 800px:
								<input type="checkbox" name="new_gn_screen_width" value="open" ' . $width_checkbox . '/>
					  		</td>
							  <td>
							  </td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - Page Bar - Site exclusion</h3>
					<div id="theme_option_set">
				   	<p>
					   	Here you can define which pages should not be visible in the page bar of the header.
							<br />
					   	Please type in the Id of the pages you want exclude separated by comma.
				   	</p>
				   	<p>
				  	 	Page-Id: <input type="text" name="new_gn_page_exclude" value="' . get_option("gn_page_exclude" ) . '" />
					   	</p>
					</div>
				</fieldset>

				<br />';

	_e( $output_line, 'german_newspaper');


	if ( $tab_feature_b1 == 'on' )
	{
		$tab_b1_checkbox = ' checked="checked" ';
	}
	else
	{
		$tab_b1_checkbox = ' ';
	}

	if ( $tab_feature_b2 == 'on' )
	{
		$tab_b2_checkbox = ' checked="checked" ';
	}
	else
	{
		$tab_b2_checkbox = ' ';
	}

	$output_line =
	'			<fieldset>
					<h3>Theme - Tab Panel Feature for Bottom Bars  (not implemented yet !!!)</h3>
					<div id="theme_option_set">
						<p>
						Here you can define if you like to have a Tab-Panel inside your two bottom bars or not.
						<br />
						</p>

						<br />

						<table>
							<tr>
								<td>
								Bottom Bar 1:
								<input type="checkbox" name="new_gn_tab_feature_b1" value="open" ' . $tab_b1_checkbox . '/>
								</td>
								<td>';

					if ( $tab_feature_b1 == 'on' )
					{
						$class = '';
					}
					else
					{
						$class = ' class="hidden" ';
					}
					
		  		$output_line .=
						'<label for="new_gn_tab_count_b1"' . $class . '>Count of Tabs: </label><input type="text"' . $class .  'size="5" name="new_gn_tab_count_b1" value="' . $tab_count_b1 . '" />
							<br />';

	$output_line .=
	'							</td>
	              <td>
	              </td>
							</tr>';

					  get_tab_b1_titles();

						foreach ( $tab_b1_titles as $index => $title )
						{
							$output_line .=
	'						<tr>
								<td>
								</td>
								<td>
								</td>
								<td>
									<label for="new_gn_b1_tab_' . $index . '_title"' . $class . '>Title Tab ' . $index . ': </label>
									<input type="text" size="15"' . $class . ' name="new_gn_b1_tab_' . $index . '_title" value="' . $title . '" />
								</td>
							<tr>';
						}

	$output_line .=
	'							<td>
								Bottom Bar 2:
								<input type="checkbox" name="new_gn_tab_feature_b2" value="open" ' . $tab_b2_checkbox . '/>
							</td>
							<td>';

					if ( $tab_feature_b2 == 'on' )
					{
						$class = '';
					}
					else
					{
						$class = ' class="hidden" ';
					}

		  		$output_line .=
						'<label for="new_gn_tab_count_b2"' . $class . '>Count of Tabs: </label><input type="text"' . $class .  'size="5" name="new_gn_tab_count_b2" value="' . $tab_count_b2 . '" />
							<br />';

	$output_line .=
	'						</td>
	            <td>
	            </td>
							</tr>';
							
					  get_tab_b2_titles();

						foreach ( $tab_b2_titles as $index => $title )
						{
							$output_line .=
	'						<tr>
								<td>
								</td>
								<td>
								</td>
								<td>
									<label for="new_gn_b2_tab_' . $index . '_title"' . $class . '>Title Tab ' . $index . ': </label>
									<input type="text" size="15"' . $class . ' name="new_gn_b2_tab_' . $index . '_title" value="' . $title . '" />
								</td>
							<tr>';
						}

	$output_line .=
	'					</table>
						</div>';

	_e( $output_line, 'german_newspaper');

	$output_line =
	'     </fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - remove all registered widgets</h3>
					<div id="theme_option_set">
				   	<p>
					   	Set this if you want remove all registered widgets from all sidebars.
							<br />
				   	</p>
				   	<p>
						<input type="checkbox" name="new_gn_rem_widgets" value="open" />
				   	</p>
					</div>
				</fieldset>

    		<br />

				<p class="submit">
					<input type="submit" name="info_update" value="Update Options &raquo;" />
				</p>
			</form>
		</div>';

	_e( $output_line, 'german_newspaper');

}

?>